import java.util.Arrays;

public class Test20230811_1 {
    public static void main(String[] args){
        int [] a = {1,2,3,4,5,6};
        for(int i = 0; i<a.length; i++){
            int tem = 0;
            if(a[i]%2!=0){
               tem=a[i];
               a[i]=a[a.length-i-1];
               a[a.length-i-i]=tem;
            }
        }
        String aa = Arrays.toString(a);
        System.out.println(aa);
    }
}
